package com.lms.admin.base.vo;

import com.lms.common.entity.SysMenu;
import com.lms.common.pure.entity.TreeNode;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "菜单信息")
public class MenuNode extends TreeNode<Long> {
    @Schema(name = "路由地址")
    private String router;
    @Schema(name = "菜单图标")
    private String icon;

    public MenuNode(SysMenu menu) {
        this.id = menu.getId();
        this.name = menu.getName();
        this.router = menu.getPath();
        this.icon = menu.getIcon();
    }
}
